<!--$embed{"../header.htm"}-->
<script type="text/javascript" src="${request.contextPath}/source/script_autocomplete.js"></script>
<!--$if{ space.self }-->
<div class="searchbar">
<table cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<table cellspacing="0" cellpadding="0">
				<tr>
					<td style="padding: 0;"><input type="text" id="username" name="username" value="搜索好友" onfocus="if(this.value=='搜索好友')this.value='';" class="t_input" tabindex="1" onclick="auc.handleEvent(this.value ,event);" onkeyup="auc.handleEvent(this.value ,event);inputKeyDown(event, 1);" onkeydown="closeOpt(event);inputKeyDown(event);" autocomplete="off" style="width: 160px; border-right: none;" /></td>
					<td style="padding: 0;"><a href="javascript:searchFriend();"><img src="image/search_btn.gif" alt="搜索" /></a></td>
				</tr>
			</table>
			<div id="username_menu" class="ajax_selector" onclick="usernamehide()" style="display:none">
				<div class="ajax_selector_option" style="width: 181px; height: 100px;">
					<a href="javascript:;" onclick="usernamehide()" class="float_del" style="margin-right: 5px;">a</a>
					<ul id="friendlist" class="blocklink"></ul>
				</div>
			</div>
		</td>
	</tr>
</table>
</div>
<h2 class="title"><img src="image/icon/friend.gif" />好友</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li${actives['me']}><a href="space.html?uid=${space['uid']}&do=friend"><span>好友列表</span></a></li>
		<li><a href="cp.html?ac=friend&op=find"><span>可能认识的人</span></a></li>
		<!--$if{ !_SCONFIG['closeinvite'] }-->
		<li><a href="cp.html?ac=invite"><span>邀请好友</span></a></li>
		<!--$end-->
	</ul>
</div>
<div id="content" style="width: 640px;">

  <div class="c_mgs"><div class="ye_r_t"><div class="ye_l_t"><div class="ye_r_b"><div class="ye_l_b">
    <!--$if{ view=='blacklist'}-->
      加入到黑名单的用户，将会从您的好友列表中删除。同时，对方将不能进行与您相关的打招呼、踩日志、加好友、评论、留言、短消息等互动行为。
    <!--$elseif{ view=='me'}-->
      好友列表按照好友热度高低排序<br>
      好友热度是系统根据您与好友之间交互的动作自动累计的一个参考值，数值越大，表示您与这位好友互动越频繁。
    <!--$elseif{ view=='online'}-->
      <!--$if{ type == 'friend'}-->
      这些好友当前在线，赶快去拜访一下吧
      <!--$elseif{ type=='near'}-->
      通过系统匹配，这些朋友就在您附近，您可能认识他们
      <!--$else-->
      显示当前全部在线的用户
      <!--$end-->
    <!--$elseif{ view=='visitor'}-->
      他们拜访else下吧
    <!--$elseif{ view=='trace'}-->
      您曾经拜访过的用户列表
    <!--$elseif{ view=='me'}-->
    <!--$end-->
  </div></div></div></div></div>
  
  <!--$if{ view=='blacklist'}-->
  <div class="h_status">
    <h2>添加新黑名单用户</h2>
    <form method="post" name="blackform" action="cp.html?ac=friend&op=blacklist&start=${start}">
      用户名：<input type="text" name="username" value="" size="15" class="t_input">
      <input type="submit" name="blacklistsubmit_btn" id="moodsubmit_btn" value="添加" class="submit">
      <input type="hidden" name="blacklistsubmit" value="true" />
    <input type="hidden" name="formhash" value="${&com.heaven.web.utils.Common.formhash()}" />
    </form>
  </div>
  <!--$end-->
  
  <!--$if{ list}-->
  <div class="thumb_list" id="friend_ul">
    <ul>
    <!--$for{value:list}-->
      <li>
        <div class="avatar48"><a href="space.html?uid=${value['uid']}"><img src="<!--${&com.heaven.web.utils.Common.avatar( value['uid'], 'small')}-->" alt="${_SN[value['uid']]}" width="48" height="48" /></a></div>
        <div class="thumbTitle"><p<!--$if{ ols[value.uid]}--> class="online_icon_p"<!--$end-->>
          <a href="space.html?uid=${value['uid']}" <!--${&com.heaven.web.utils.Common.g_color( value['groupid'] )}-->>
          ${_SN[value['uid']]}</a> <!--${&com.heaven.web.utils.Common.g_icon( value['groupid'] )}--></p>
        </div>
        <!--$if{ value['note']}--><div>${value['note']}</div><!--$end-->
        
        <!--$if{ view=='blacklist'}-->
          <div class="setti"><a href="cp.html?ac=friend&op=blacklist&subop=delete&uid=${value['uid']}&start=${start}">黑名单除名</a></div>
        <!--$elseif{ view=='visitor' || view == 'trace'}-->
          <div class="setti"><!--${&com.heaven.web.utils.Common.sgmdate('MM月dd号',value['dateline'],true)}--></div>
        <!--$elseif{ view=='online'}-->
          <div class="setti"><!--${&com.heaven.web.utils.Common.sgmdate('HH:mm',ols[ value['uid'] ],true)}--></div>
        <!--$else-->
          <!--$if{ ols[value['uid']] }--><div class="setti"><!--${&com.heaven.web.utils.Common.sgmdate('HH:mm',ols[ value['uid']] ,true )}--></div><!--$end-->
          <div class="setti">
          <!--$if{ value['num']}-->热度(${value['num']})<span class="pipe">|</span><!--$end-->
          <!--$if{ !value['isfriend']}-->
          <a href="cp.html?ac=friend&op=add&uid=${value['uid']}" id="a_friend_${key}" onclick="ajaxmenu(event, this.id, 99999, '', -1)">加为好友</a>
          <!--$else-->
          <a href="cp.html?ac=friend&op=changegroup&uid=${value['uid']}" id="a_group_${key}" onclick="ajaxmenu(event, this.id, 99999)">分组</a><span class="pipe">|</span>
          <a href="cp.html?ac=friend&op=ignore&uid=${value['uid']}" id="a_ignore_${key}" onclick="ajaxmenu(event, this.id, 99999)">删除</a>
          <!--$end-->
          </div>
        <!--$end-->
      </li>
    <!--$end-->
    </ul>
  </div>
  <div class="page">${multi}</div>

  <!--$else-->
  <div class="c_form">
    没有相关用户列表。
  </div>
  <!--$end-->
  
</div>
<div id="sidebar" style="width: 150px;">
	<div class="cat">
		<h3>
			好友菜单
		</h3>
		<ul>
		  <li${a_actives['me']}><a href="space.html?uid=${space['uid']}&do=friend">全部好友列表</a></li>
	      <li${a_actives['onlinefriend']}><a href="space.html?uid=${space['uid']}&do=friend&view=online&type=friend">当前在线的好友</a></li>
	      <li${a_actives['onlinenear']}><a href="space.html?uid=${space['uid']}&do=friend&view=online&type=near">就在我附近的朋友</a></li>
	      <li${a_actives['visitor']}><a href="space.html?uid=${space['uid']}&do=friend&view=visitor">我的访客</a></li>
	      <li${a_actives['trace']}><a href="space.html?uid=${space['uid']}&do=friend&view=trace">我的足迹</a></li>
	      <li${a_actives['blacklist']}><a href="space.html?uid=${space['uid']}&do=friend&view=blacklist">我的黑名单</a></li>
		</ul>
	</div>
  <!--$if{ groups}-->
  <div class="cat">
    <h3>
      <span class="r_option"><a href="cp.html?ac=friend&op=group">批量分组</a></span>
      好友分组
    </h3>
    <ul class="post_list line_list">
      <li><a href="space.html?do=friend&group=-1">全部好友</a></li>
      <!--$for{value:groups} $set{key = for.index}-->
      <li ${groupselect[key.toString]}>
        <!--$if{ space['privacyMap']['filter_gid'][key]}--><span class="gray">[屏蔽]</span><!--$end--> <a href="space.html?do=friend&group=${key}"><span id="friend_groupname_${key}">${value}</span></a>
        <!--$if{ key}-->
        <a href="cp.html?ac=friend&op=groupname&group=${key}" id="c_edit_${key}" onclick="ajaxmenu(event, this.id, 99999, '', -1)" title="编辑用户组名" class="c_edit">编辑</a>
        <!--$end-->
        <a href="cp.html?ac=friend&op=groupignore&group=${key}" id="c_ignore_${key}" onclick="ajaxmenu(event, this.id, 99999)" title="屏蔽用户组动态" class="c_delete">屏蔽</a>
      </li>
      <!--$end-->
    </ul>
  </div>
  <!--$end-->

</div>
<script language="javascript" type="text/javascript" src="${request.contextPath}/template/default/space/space_friend.js"></script>
<script type="text/javascript">
var close = true;
var auc = new sAutoComplete("auc", "username_menu", "friendlist", "username", 0, searchFriend);
auc.addItem('${friendstr}');
</script>

<!--$else-->
  <!--${_TPL.put("spacetitle", "好友")}-->
  <!--$embed{"../space_menu.htm"}-->
  <div class="c_form l_status">共有 ${space['friendnum']} 个好友</div>
  <!--$embed{"../space_list.htm"}-->
<!--$end-->

<!--$embed{"../footer.htm"}-->
